using System;
using UnityEngine;

namespace DanielSig.UnityExtensions
{
	public static class XFloatVector
	{
		public static Vector2 Join(this float x, float y)
		{
			return new Vector2(x, y);
		}
		
		
		public static Vector3 Join(this float x, float y, float z)
		{
			return new Vector3(x, y, z);
		}
		public static Vector3 Join(this float x, Vector2 yz)
		{
			return new Vector3(x, yz.x, yz.y);
		}
		public static Vector3 Join(this Vector2 xy, float z)
		{
			return new Vector3(xy.x, xy.y, z);
		}
		
		
		public static Vector4 Join(this float x, float y, float z, float w)
		{
			return new Vector4(x, y, z, w);
		}
		public static Vector4 Join(this float x, float y, Vector2 zw)
		{
			return new Vector4(x, y, zw.x, zw.y);
		}
		public static Vector4 Join(this float x, Vector2 yz, float w)
		{
			return new Vector4(x, yz.x, yz.y, w);
		}
		public static Vector4 Join(this float x, Vector3 yzw)
		{
			return new Vector4(x, yzw.x, yzw.y, yzw.z);
		}
		public static Vector4 Join(this Vector2 xy, float z, float w)
		{
			return new Vector4(xy.x, xy.y, z, w);
		}
		public static Vector4 Join(this Vector2 xy, Vector2 zw)
		{
			return new Vector4(xy.x, xy.y, zw.x, zw.y);
		}
		public static Vector4 Join(this Vector3 xyz, float w)
		{
			return new Vector4(xyz.x, xyz.y, xyz.z, w);
		}
		
		
		public static Vector2 NewX(this Vector2 v, float newX)
		{
			return new Vector2(newX, v.y);
		}
		public static Vector2 NewY(this Vector2 v, float newY)
		{
			return new Vector2(v.x, newY);
		}
		
		public static Vector3 NewX(this Vector3 v, float newX)
		{
			return new Vector3(newX, v.y, v.z);
		}
		public static Vector3 NewY(this Vector3 v, float newY)
		{
			return new Vector3(v.x, newY, v.z);
		}
		public static Vector3 NewZ(this Vector3 v, float newZ)
		{
			return new Vector3(v.x, v.y, newZ);
		}
		
		public static Vector4 NewX(this Vector4 v, float newX)
		{
			return new Vector4(newX, v.y, v.z, v.w);
		}
		public static Vector4 NewY(this Vector4 v, float newY)
		{
			return new Vector4(v.x, newY, v.z, v.w);
		}
		public static Vector4 NewZ(this Vector4 v, float newZ)
		{
			return new Vector4(v.x, v.y, newZ, v.w);
		}
		public static Vector4 NewW(this Vector4 v, float newW)
		{
			return new Vector4(v.x, v.y, v.z, newW);
		}
	}
}